﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;

namespace qkview.Models
{
    public class BoardModels
    {
        public IEnumerable<Board> ListModel { get; set; }
        public Board CreateModel { get; set; }
        public Board EditModel { get; set; }
    }
    
    
    [MetadataType(typeof(UserProfileMetaData))]
    public partial class UserProfile
    {
        internal sealed class UserProfileMetaData
        {
            [Key]
            public int UserId { get; set; }
            [MaxLength(100)]
            public string Name { get; set; }
            [MaxLength(100)]
            public string Email { get; set; }
            [Required, MaxLength(50)]
            public string UserName { get; set; }
            public bool IsBlocked { get; set; } 
        }

    }


    [MetadataType(typeof(BoardMetaData))]
    public partial class Board
    {
        internal sealed class BoardMetaData
        {
            [Key]
            public int BoardID { get; set; }
            [Required, MaxLength(50)]
            public string Title { get; set; }
            [MaxLength(50)]
            public string URLSlug { get; set; }
            [MaxLength(255)]
            public string Description { get; set; }
            public bool IsPrivate { get; set; }
            public bool IsBlocked { get; set; } 
            public DateTime CreatedDate { get; set; }
            public int UserID { get; set; }
            [Display(Name="Category")] 
            public int CategoryID { get; set; }
           
        }
    }

    [MetadataType(typeof(NoteMetaData))]
    public partial class Note
    {
         internal sealed class NoteMetaData
         {
             [Key]
             public int NoteID { get; set; }
             [Required, MaxLength(50)]
             public string Title { get; set; }
             public string Description { get; set; }
             public int SortIndex { get; set; }
             public DateTime CreatedDate { get; set; }
             public int BoardID { get; set; }             
         }
    }


    [MetadataType(typeof(SectionMetaData))]
    public partial class Section
    {
        internal sealed class SectionMetaData
        {
            [Key]
            public int SectionID { get; set; }
            public int NoteID { get; set; }
            [Required, MaxLength(50)]
            public string Title { get; set; }
            [Required, MaxLength(500)]
            public string Summary { get; set; }
            public string Description { get; set; }
            public int SortIndex { get; set; }
        }
    }

    public class FullUserInfo
    {
        public int UserID { get; set; }
        [StringLength(100)] 
        public string Name { get; set; }
         [StringLength(100)] 
        public string Email { get; set; }
         [StringLength(50)] 
        public string UserName { get; set; }
        public bool? IsBlocked { get; set; }
        public int? TotalBoards { get; set; }
        public int? TotalNotes { get; set; }
        public int? TotalSection { get; set; }
        public bool? AdvSecDescription { get; set; }
        public DateTime? CreateDate { get; set; }
        public bool? IsConfirmed { get; set; }
        public string Provider { get; set; }
    }

}